<!--=============================================
=            Breadcrumb Area         =
=============================================-->

<div class="breadcrumb-area breadcrumb-bg pt-85 pb-85 mb-80">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="breadcrumb-container">
                    <ul>
                        <li><a href="/">Home</a> <span class="separator">/</span></li>
                        <li class="active">My Account</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<!--=====  End of Breadcrumb Area  ======-->

<!--=============================================
=            My Account page content         =
=============================================-->

<div class="page-section mb-80">
    <div class="container">
        <div class="row">
            <div class="col-12">
                <div class="row">
                    <!-- My Account Tab Menu Start -->
                    <div class="col-lg-3 col-12">
                        <div class="myaccount-tab-menu nav" role="tablist">
                            <a href="{:url('home/user/index')}"><i class="fa fa-dashboard"></i>
                                Dashboard</a>

                            <a href="{:url('home/user/order')}" class="active"><i class="fa fa-cart-arrow-down"></i>
                                Orders</a>

                            <!--                            <a href="#download" data-toggle="tab"><i class="fa fa-cloud-download"></i> Download</a>-->

                            <!--                            <a href="#payment-method" data-toggle="tab"><i class="fa fa-credit-card"></i> Payment-->
                            <!--                                Method</a>-->

                            <!--                            <a href="#address-edit" data-toggle="tab"><i class="fa fa-map-marker"></i> address</a>-->

                            <a href="#account-info" data-toggle="tab"><i class="fa fa-user"></i> Account Details</a>

                            <a href="{:url('home/user/logout')}"><i class="fa fa-sign-out"></i> Logout</a>
                        </div>
                    </div>
                    <!-- My Account Tab Menu End -->

                    <!-- My Account Tab Content Start -->
                    <div class="col-lg-9 col-12">
                        <div class="tab-content" id="myaccountContent">
                            <!-- Single Tab Content Start -->
                            <div class="tab-pane fade  show active" id="orders" role="tabpanel">
                                <div class="myaccount-content">
                                    <h3>Order Detail</h3>

                                    <div class="myaccount-table table-responsive text-center" style="">
                                        <table class="table table-bordered">
                                            <tr>
                                                <th>Order No :</th>
                                                <th> <?php echo $order['sn']; ?></th>
                                            </tr>
                                            <tr>
                                                <th>Order Total:  </th>
                                                <th> <?php echo $order['order_total'];?></th>
                                            </tr>
                                            <tr>
                                                <th>First Name: </th>
                                                <th> <?php echo $order['first_name'];?></th>
                                            </tr>
                                            <tr>
                                                <th>Last Name:</th>
                                                <th><?php echo $order['last_name'];?></th>
                                            </tr>
                                            <tr>
                                                <th>Phone: </th>
                                                <th><?php echo $order['phone'];?></th>
                                            </tr>
                                            <tr>
                                                <th>Email: </th>
                                                <th><?php echo $order['email'];?></th>
                                            </tr>
                                            <tr>
                                                <th>State: </th>
                                                <th> <?php echo $order['state'];?> </th>
                                            </tr>
                                            <tr>
                                                <th>City: </th>
                                                <th><?php echo $order['city'];?></th>
                                            </tr>
                                            <tr>
                                                <th>Address1: </th>
                                                <th><?php echo $order['addr1'];?></th>
                                            </tr>
                                            <tr>
                                                <th>Address2: </th>
                                                <th><?php echo $order['addr2'];?></th>
                                            </tr>
                                            <tr>
                                                <th>Status: </th>
                                                <th>
                                                    <?php if($order['px_status']==0): ?>
                                                    待推送
                                                    <?php elseif($order['px_status']==1): ?>
                                                    推送成功
                                                    <?php elseif($order['px_status']==2): ?>
                                                    推送失败:<?php $order['px_error'] ?>
                                                    <?php endif;?>
                                                </th>
                                            </tr>
                                            <tr>
                                                <th>Order Create Time:  </th>
                                                <th> <?php echo date("y-m-d H:i:s",$order['create_time']);?></th>
                                            </tr>
                                            <tr>
                                                <th>Order Create Time:  </th>
                                                <th>Status:
                                                    <?php if($order['px_status']==0): ?>
                                                    待推送
                                                    <?php elseif($order['px_status']==1): ?>
                                                    推送成功
                                                    <?php elseif($order['px_status']==2): ?>
                                                    推送失败:<?php $order['px_error'] ?>
                                                    <?php endif;?>
                                                </th>
                                            </tr>
                                            <tr>
                                                <th>Note:  </th>
                                                <th><?php echo $order['note'];?></th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                        </table>
                                    </div>

                                    <div class="myaccount-table table-responsive text-center" style="">
                                        <table class="table table-bordered">
                                            <thead class="thead-light">
                                            <tr>
                                                <th>Image</th>
                                                <th>Product</th>
                                                <th>Sku</th>
                                                <th>Goods Number</th>
                                            </tr>
                                            </thead>

                                            <tbody>
                                            <?php if($goods_list):foreach($goods_list as $goods): ?>
                                            <tr>
                                                <td><img src="<?php echo $goods['product_pic'] ?>" style="width:200px;" class="img-fluid" alt="Product"></td>
                                                <td><?php echo $goods['product_title']; ?></td>
                                                <td><?php echo $goods['sku']; ?> </td>
                                                <td><?php echo $goods['num']; ?> </td>
                                            </tr>
                                            <?php endforeach;endif; ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                            <!-- Single Tab Content End -->
                        </div>
                    </div>
                    <!-- My Account Tab Content End -->
                </div>

            </div>
        </div>
    </div>
</div>

<!--=====  End of My Account page content  ======-->